home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette: SID64 / SID64.D64 / sid copier.64 (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  3KB  |  59 lines

  1. 100 print chr$(147):print " sidplayer file copy utility"
  2. 110 print " by craig chamberlain        ":print
  3. 120 sa=780:sp=783:da=5358:wp=5362:fr=5363:cc=5364:ct=5365:le=5374
  4. 130 di=4377:se=4698:re=4841:wr=5089:li=5209:pr=5306
  5. 200 d$="3":print " insert source disk":print
  6. 210 print " 1 music files only":print " 2 music and word files
  7. 215 [153] " 3 music, word, and picture files":[153]
  8. 220 [153] " copy which file types (" d$ ") ? ";
  9. 222 [146] 198,15:[161] g$:[139] g$[178][199](13) [167] g$[178]d$
  10. 224 [139] g$[179]"1" [176] g$[177]"3" [137] 222
  11. 226 [153] g$:[151] wp,0:[139] g$[177]"1" [167] [151] wp,1:[139] g$[178]"3" [167] [151] wp,128
  12. 230 la[178][194](49)[170]256[172][194](50)[170]100:[151] da,la[171]256[172][181](la[173]256):[151] da[170]1,la[173]256
  13. 240 [153]:[158] di:[139] [194](cc)[178]0 [167] [153] " no music files on disk":[128]
  14. 250 [151] fr,([194](51)[170]256[172][194](52)[171][194](da[170]2)[171]256[172][194](da[170]3)[171]400)[173]253:[153]
  15. 260 [153] " enter names of files to copy
  16. 265 print " then enter 'begin' to start":print:poke ct,0
  17. 300 print peek(fr) "blocks free":print " copy #";:poke sa,peek(ct)+1:sys pr
  18. 305 i$="":k=fre(0):input i$:print:if i$="" then sys li:print:goto 300
  19. 310 if i$="begin" goto 400
  20. 320 mf=0:f$=i$:r$=right$(f$,4)
  21. 325 if not(r$=".mus" or r$=".wds" or r$=".pic") then mf=1:f$=f$+".mus"
  22. 330 l=len(f$):if l>16 then print " filename too long":print:goto 300
  23. 332 for k=1 to l:poke 571+k,asc(mid$(f$,k)):next:poke sa,l:sys se
  24. 334 on peek(sa)+1 goto 350,341,342,343
  25. 341 print " file not on disk":print:goto 300
  26. 342 print " file already selected":print:goto 300
  27. 343 print " not enough memory":print:goto 300
  28. 350 if mf=0 goto 300
  29. 352 poke 569+l,87:poke 570+l,68:poke sa,l:sys se
  30. 354 sf=0:on peek(sa) goto 370,370,395
  31. 360 sf=1
  32. 370 poke 569+l,80:poke 570+l,73:poke 571+l,67:poke sa,l:sys se
  33. 375 on peek(sa) goto 390,390,396
  34. 380 sf=sf or2
  35. 390 on sf+1 goto 300,391,392,393
  36. 391 print " music and word files selected":print:goto 300
  37. 392 print " music and picture files selected":print:goto 300
  38. 393 print " music, word, picture files selected":print:goto 300
  39. 395 print " not enough memory for words file":print:goto 300
  40. 396 print " not enough memory for picture file":print:goto 300
  41. 400 if peek(ct)=0 then print " no files selected":print:goto 300
  42. 410 open 2,8,15,"i0:":input#2,a,b$,c,d:if a goto 710
  43. 420 sys re:print:if peek(sp)and1 goto 700
  44. 500 print " insert destination disk":print " and press any key":poke 198,0
  45. 505 wait 198,15:get g$:print:print#2,"i0:":input#2,a,b$,c,d:if a goto 710
  46. 510 for k=1 to peek(ct)
  47. 520 poke sa,k:sys wr:if (peek(sp)and1)=0 goto 550
  48. 530 input#2,a,b$,c,d:if a<>63 then print:goto 710
  49. 532 print:print " error: " b$:print:print " okay to replace? ";
  50. 534 wait 198,15:get g$:if g$="n" then print "no":print:goto 550
  51. 536 if g$<>"y" goto 534
  52. 540 print "yes":print:f$="":for j=1 to peek(le)-4:f$=f$+chr$(peek(571+j)):next
  53. 542 print " scratching " f$:print
  54. 544 print#2,"s0:"+f$:input#2,a,b$,c,d:if a>1 goto 710
  55. 546 j=fre(0):goto 520
  56. 550 next:close 2:print:print " copying completed":end
  57. 700 input#2,a,b$,c,d
  58. 710 print " error: " b$:close 2:end
  59.